package com.hyts.agent.auto.transform;


import com.hyts.agent.spi.transform.AgentClassTransform;

import java.lang.instrument.IllegalClassFormatException;
import java.security.ProtectionDomain;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.agent.core
 * author:Libo/Alex
 * create-date:2019-06-29 15:40
 * copyright:libo-hyts-github
 * email:libo2dev@aliyun.com
 * description:此类主要用于: 默认的文件class格式化转换器类
 */
public class DefaultClassTransformService implements AgentClassTransform {


    @Override
    public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain,
                            byte[] classfileBuffer) throws IllegalClassFormatException {
        return classfileBuffer;
    }

    @Override
    public boolean isRetransform() {
        return true;
    }
}
